package mypackage;

import generator.FieldSize;
import generator.TypeMapper;

public class MyMapper implements TypeMapper {

	@Override
	public String obtainType(Class<?> type, FieldSize annotation) {
		if(type.equals(int.class))
			return "INTEGER";
		else if (type.equals(String.class))  {
			if(annotation == null)
				return "VARCHAR(50)";
			else
				return "VARCHAR(" + annotation.value() * 2 + ")";
		}
		return null;
	}

}
